package cn.wizzer.app.task.commons.ext.quartz.job;

import cn.wizzer.app.crown.modules.services.ViewPointService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.quartz.Job;
import org.quartz.JobExecutionContext;

@IocBean
public class ViewPointJob implements Job {

    private static final Log log = Logs.get();

    @Inject
    @Reference(retries = 3,timeout = 500000)
    private ViewPointService viewPointService;

    @Override
    public void execute(JobExecutionContext context) {
       try{
           viewPointService.settle();
       }catch (Exception e){
           log.error(e.getMessage());
       }
    }

}
